package cn.koala.key.api;

import cn.koala.key.common.feign.BaseApi;
import cn.koala.key.complaint.entity.dto.CarRepairShopDTO;
import cn.koala.key.complaint.entity.dto.ShopItemInfoDTO;
import cn.koala.key.receipt.vo.CarRepairShop;
import cn.seed.common.core.Result;
import feign.Param;
import feign.RequestLine;

import java.util.List;

/**
 * @author liutao
 * @date 2021/1/18
 */
public interface ShopApi extends BaseApi {
    @RequestLine("GET /shop/shops")
    Result<List<CarRepairShopDTO>> listShops();

    @RequestLine("GET /shop/car/repair/shop/fuzzyNameOrById?name={name}&id={id}")
    Result<List<CarRepairShop>> getCarRepairShopFuzzyNameOrById(@Param("name") String name, @Param("id") Integer id);

    @RequestLine("GET /shop/shopByCityItemSort?cityId={cityId}&pageNumber={pageNumber}&latitude={latitude}&longitude={longitude}&pageSize={pageSize}")
    Result<List<ShopItemInfoDTO>> shopByCityAndSort(@Param("cityId") Integer cityId,
                                                    @Param("latitude") Double latitude, @Param("longitude") Double longitude,
                                                    @Param("pageNumber") Integer pageNumber, @Param("pageSize") Integer pageSize);
}
